/*================================================================================
*
*
*                                   
*
*
* 项目名称: mcp2515-spi-can-demo
* 文件名称: bsp_mcp2515.h
* 创建日期: 21-02-03
* 文件描述: 
*
================================================================================*/
#ifndef BSP_MCP2515_H_
#define BSP_MCP2515_H_

#include "main.h"
#include "gpio.h"

#define MCU_SPI_CTRL_CS_LO()                HAL_GPIO_WritePin(MCP2515nCS_GPIO_Port, MCP2515nCS_Pin, GPIO_PIN_RESET)
#define MCU_SPI_CTRL_CS_HI()                HAL_GPIO_WritePin(MCP2515nCS_GPIO_Port, MCP2515nCS_Pin, GPIO_PIN_SET)

extern void MCU_SPI_WRITE_FUNCTION(uint8_t u8data);
extern void MCU_SPI_WR_BURST_FUNTION(const uint8_t *pdata, uint16_t u16Amount);
extern void MCU_SPI_READ_FUNCTION(uint8_t *pdata, uint16_t u16Amount);

#endif
